package com.xinqi.modules.course.course.enums.clazz;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.annotations.Describe;
import com.xinqi.common.base.enums.BaseEnum;
import lombok.Getter;

@Describe("班级操作日志类型")
public enum ClassOperationLogTypeEnum implements BaseEnum {
    /**
     * 加入
     */
    AUTO_JOIN("AUTO_JOIN", "免审核加入"),

    AUDIT_JOIN("AUDIT_JOIN", "审核通过加入"),

    MOVE_IN("MOVE_IN", "老师添加"),

    QUIT("QUIT", "学生自己退出"),

    /**
     * 移出
     */
    MOVE_OUT("MOVE_OUT", "老师移出");

    @Getter(onMethod_ = {@JsonValue})
    private final String code;

    @Getter
    private final String describe;

    ClassOperationLogTypeEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static ClassOperationLogTypeEnum of(String code) {
        return BaseEnum.of(ClassOperationLogTypeEnum.class, code);
    }
}

